package com.gview.example.common.viewStatic;

import com.gonsin.gview.annotations.GView;
import com.gonsin.gview.annotations.board.GBoard;
import com.gonsin.gview.annotations.board.GButton;
import com.gonsin.gview.annotations.board.form.GForm;
import com.gonsin.gview.annotations.board.form.GFormItem;
import com.gonsin.gview.annotations.board.form.GTextInput;
import com.gonsin.gview.annotations.enums.ButtonAction;
import com.gonsin.gview.annotations.enums.InputType;

@GView(
        viewName = "AddBook",
        title = "添加项目",
        boards = @GBoard(
                form = @GForm(
                        formItems = {
                                @GFormItem(textInput = @GTextInput(name = "图书名字", keyName = "bookName", placeholder = "请输入图书名字")),
                                @GFormItem(textInput = @GTextInput(name = "作者", keyName = "author", placeholder = "请输入作者")),
                                @GFormItem(textInput = @GTextInput(name = "价格", keyName = "price", placeholder = "请输入价格", inputType = InputType.NUMBER)),
                        },
                        okButton = @GButton(action = ButtonAction.CONFIRM_AND_CLOSE, actionName = "addBook"),
                        cancelButton = @GButton(action = ButtonAction.CLOSE_DIALOG)
                )
        )
)
public class BookAddView {


}
